/*
 * Copyright 2018 JDCLOUD.COM
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http:#www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * 
 * 
 *
 * 
 * Contact: 
 *
 * NOTE: This class is auto generated by the jdcloud code generator program.
 */


using System;
using System.Collections.Generic;
using System.Text;

using JDCloudSDK.Core.Annotation;

namespace JDCloudSDK.Waf.Model
{

    /// <summary>
    ///  setCcRuleReq
    /// </summary>
    public class SetCcRuleReq
    {

        ///<summary>
        /// WAF实例id
        ///Required:true
        ///</summary>
        [Required]
        public string WafInstanceId{ get; set; }
        ///<summary>
        /// 域名
        ///Required:true
        ///</summary>
        [Required]
        public string Domain{ get; set; }
        ///<summary>
        /// 规则名称
        ///Required:true
        ///</summary>
        [Required]
        public string RuleName{ get; set; }
        ///<summary>
        /// uri以/开头
        ///Required:true
        ///</summary>
        [Required]
        public string Uri{ get; set; }
        ///<summary>
        /// 精确匹配0  前缀匹配1 包含匹配2 后缀匹配5
        ///</summary>
        public int? MatchType{ get; set; }
        ///<summary>
        /// 检测周期，单位是秒，[30~600]
        ///Required:true
        ///</summary>
        [Required]
        public int DetectPeriod{ get; set; }
        ///<summary>
        /// ip访问次数，[1~9999999]
        ///Required:true
        ///</summary>
        [Required]
        public int SingleIpLimit{ get; set; }
        ///<summary>
        /// 阻断类型 3:封禁，2:人机交互
        ///Required:true
        ///</summary>
        [Required]
        public int BlockType{ get; set; }
        ///<summary>
        /// block 持续时间，单位为分钟 [1~24*60]
        ///Required:true
        ///</summary>
        [Required]
        public int BlockTime{ get; set; }
        ///<summary>
        /// blockType 为3 时，为自定义页面名称，缺省为default
        ///</summary>
        public string Redirection{ get; set; }
        ///<summary>
        /// cc 统计维度，ip或cookie
        ///</summary>
        public string Dimension{ get; set; }
        ///<summary>
        /// cookiename, 只有当 dimension 为 cookie 时才有效
        ///</summary>
        public string Dmvalue{ get; set; }
    }
}
